import * as React from 'react';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogContent from '@mui/material/DialogContent';
import DialogActions from '@mui/material/DialogActions';
var {electron}=window.myremote;//
var config=window.myremote.config.get();
export default function About(props){
  const onClick=()=>{
    // console.log(electron.shell);
    electron.shell.openExternal(config.website);
  }
  return <Dialog open={props.open}  onClose={props.onClose}>
      <DialogTitle>About Sqlectron</DialogTitle>
      <DialogContent>
        <table>
        <tbody>
        <tr><td>Version:</td><td>{config.version}</td></tr>
        <tr><td>Author:</td><td>{config.author.name}</td></tr>
        <tr><td>email:</td><td>{config.author.email}</td></tr>
        <tr><td>website:</td><td><a onClick={onClick}>{config.website}</a></td></tr>
        </tbody></table>
      </DialogContent>
      <DialogActions>
        <button onClick={props.handleClose}>
          ok
        </button>
      </DialogActions>
    </Dialog>;
}